package com.cskaoyan.controller.wxcontroller;

import com.cskaoyan.bean.bo.OnlyIdBo;
import com.cskaoyan.bean.vo.BaseRespVo;
import com.cskaoyan.bean.vo.WxFootPrintListVo;
import com.cskaoyan.bean.wxbo.WxCouponListBo;
import com.cskaoyan.service.WxFootprintService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("wx/footprint")
public class WxFootprintController {


    @Autowired
    WxFootprintService wxFootprintService;

    @RequestMapping("list")
    public BaseRespVo WxFootprintList(WxCouponListBo listBo) {
        WxFootPrintListVo wxFootPrintListVo=wxFootprintService.getFootprintList(listBo);
        return BaseRespVo.ok(wxFootPrintListVo);
    }

    @RequestMapping("delete")
    public BaseRespVo deleteWxFootprint(@RequestBody OnlyIdBo onlyIdBo){
        Integer id = onlyIdBo.getId();
        wxFootprintService.deleteWxFootprint(id);
        return BaseRespVo.ok();
    }
}
